<template>
	<view class="list-item" @click="toPage">
		<view class="title">
			{{item.title}}
		</view>
		<u-icon name="arrow-right" color="#929292" size="24"></u-icon>
	</view>
</template>

<script>
	export default {
		name: 'ListItem',
		props: {
			item: {
				type: Object,
				default() {
					return {}
				}
			}
		},
		methods: {
			//跳转对应页面
			toPage () {
				if (this.item.path == 'call') {
					uni.makePhoneCall({
						phoneNumber: '114'
					})
				} else {
					this.$Router.push({
						name: this.item.path
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.list-item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 108rpx;
		border-bottom: 1px solid #E5E5E5;
		&:nth-last-child(1) {
			border: none;
		}
		.title {
			font-size: 30rpx;
			color: #000000;
		}
	}
</style>
